import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "dbshopST020_删除属性信息"

# 1.点击“删除”按钮，确定删除，删除成功。

firefox = openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','商品属性','属性')

# 1.点击“删除”按钮，确定删除，删除成功。
firefox.find_element_by_xpath('//td[contains(.,"天天向上")]/following-sibling::td[4]/a[3]').click()

# 断言
try:
    firefox.find_element_by_xpath('//td[contains(.,"天天向上")]').is_displayed()
    writeLog("%s 测试失败" % testCase)
except:
    writeLog("%s 测试成功" % testCase)
    getPhoto(firefox)
firefox.quit()

